package com.shiliao.app.manager.entity;

import com.yimei.framework.base.serializer.JSONKey;
import com.yimei.framework.mvp.entity.BaseEntity;

import org.json.JSONObject;

/**
 * 网络请求返回的公共参数
 * Created by yjl on 2017/7/13.
 */

public class CommonEntity extends BaseEntity {

    @JSONKey(keys = "state", type = String.class)
    public String state;//"state": "1",--状态码，0：失败，1：成功，1003：未登录

    @JSONKey(keys = "code", type = String.class)
    public String code;//--扩展状态码，对state做一些扩展说明，当state为0的时候，code【10001:未绑定手机】

    @JSONKey(keys = "time", type = Integer.class)
    public Integer time;//  --服务器当前时间，时间戳（秒）

    @JSONKey(keys = "referer", type = String.class)
    public String referer;

    @JSONKey(keys = "message", type = String.class)
    public String message;//"message": null, --错误说明

    @JSONKey(keys = "data", type = JSONObject.class)
    public String data;// --扩展数据

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

    public String getReferer() {
        return referer;
    }

    public void setReferer(String referer) {
        this.referer = referer;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }
}
